package com.orm.analysis.service;

import com.orm.analysis.model.Address;
import com.orm.analysis.model.ContactInfo;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;


public interface GenericService<T> {

    T create(T entity);

    void delete(Object id);

    T update(T entity);

    List<T> list(int page, int size);

    List<T> listByFields(String... fieldsNamesValues);

    List<T> findAllWithDepth( String... fetchRelations);

    T findWithDepth( String pkFieldName,Object id, String... fetchRelations);

    T getById(T entity);

    T getById(Integer id);

    void executeImproter() throws ParseException,IOException;

    List<Integer> getIdList();



    void processTaskExecutor();

    int updateExecuteUpdateByQuery(String query);

    List<T> getByIdList(Integer[] entityIdList);
}
